<!--// 설정된 컬러셋의 종류에 따라서 css파일을 import 합니다 -->

<!--@if($colorset=='layout')-->
<!--@else-->
	<!--%import("css/normal.css")-->
<!--@end-->

<div class="widget_calendar">
	<table cellspacing="0">
	<caption>
		<a href="{getUrl('search_target','regdate','search_keyword',$widget_info->prev_month)}" class="back"><img src="./images/blank.gif" alt="" /></a>{zdate($widget_info->cur_date,"Y")}.<span class="mm">{zdate($widget_info->cur_date,"m")}</span><a href="{getUrl('search_target','regdate','search_keyword',$widget_info->next_month)}" class="next"><img src="./images/blank.gif" alt="next" /></a>
	</caption>

	{@ $day = ''}
	<tbody>
	<!--@for($i=0;$i<6;$i++)-->
		<!--@if($day < $widget_info->last_day)-->
		<tr>
			<!--@for($j=0;$j<7;$j++)-->

				{@ $num = $i*7 + $j}
				<!--@if(!$started && $num >= $widget_info->start_week)-->
					{@ $started = true}
					{@ $day = 1}
					{@ $cur_date = $widget_info->cur_date.sprintf('%02d',$day) }
				<!--@elseif($started)-->
					{@ $day++}
					{@ $cur_date = $widget_info->cur_date.sprintf('%02d',$day) }
				<!--@end-->

				<!--@if($cur_date == date("Ymd"))-->{@ $today_class = "today"}<!--@else-->{@ $today_class = ""}<!--@end-->

				<!--@if($j==0)-->{@ $cell_class_name = "sun"}<!--@else-->{@ $cell_class_name = ""}<!--@end-->

				<!--@if($widget_info->calendar[$cur_date])-->
					{@ $item_class_name = "posted"}
					  {@ $day_link = getSiteUrl($widget_info->domain,'mid',$widget_info->module_info->mid,'search_target','regdate','search_keyword',$cur_date) }
				<!--@else-->
					{@ $item_class_name = ""}
					{@ $day_link = ''}
				<!--@end-->

				<td class="{$today_class} {$cell_class_name} {$item_class_name}">
					<!--@if($day <= $widget_info->last_day)-->
						<!--@if($day_link)-->
							<a href="{$day_link}">{$day}</a>
						<!--@else-->
							{$day}
						<!--@end-->
					<!--@end-->
				</td>
			<!--@end-->
		</tr>
		<!--@end-->
	<!--@end-->
	</tbody>
	</table>
</div>
